package com.hub.esdemo.controller;

import com.hub.esdemo.dto.Msg;
import com.hub.esdemo.service.msg.RabbitMQSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ author 飞天蝙蝠
 * @ date & time 2024/12/28 12:45
 */
@RestController
@RequestMapping("/mq")
public class MsgController {

    @Autowired
    private RabbitMQSender rabbitMQSender;

    @PostMapping("/send")
    public void sendMsg(@RequestBody Msg msg) {
        rabbitMQSender.send(msg);
    }

}

